package com.xd.core.business.dto;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 授信表
 * </p>
 *
 * @author ZX
 * @since 2025-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CreditContractDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "credit_id", type = IdType.AUTO)
    @ApiModelProperty(value = "授信ID")
    private Integer creditId;

    @ApiModelProperty(value = "授信金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "剩余授信额度")
    private BigDecimal amountRest;

    @ApiModelProperty(value = "申请提现金额")
    private BigDecimal outLoan;

    @ApiModelProperty(value = "授信起始日期")
    @JsonFormat(pattern = "yyyy-MM-dd", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "授信到期日期")
    @JsonFormat(pattern = "yyyy-MM-dd", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private Date expireTime;

    @ApiModelProperty(value = "罚款利率%")
    private BigDecimal penaltyRate;

    @ApiModelProperty(value = "借款人账户名")
    private String accountName;

    @ApiModelProperty(value = "借款人收款账户")
    private String receivingAccount;

    @ApiModelProperty(value = "借款人开户银行")
    private String bank;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "授信人ID")
    private Integer userId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "进件单号")
    private Integer incomingId;

    @ApiModelProperty(value = "授信状态(0--等待授信,1--授信失败,2--授信成功)")
    private String status;

    @ApiModelProperty(value = "还款账号")
    private String repayAccount;

    @ApiModelProperty(value = "还款开户行")
    private String repayBank;

    @ApiModelProperty(value = "还款账户名")
    private String repayName;

    @ApiModelProperty(value = "绑卡状态(0--未绑定,1--已绑定)")
    private String cardStatus;

    @ApiModelProperty(value = "签约协议号")
    private String protocolNo;

    @ApiModelProperty(value = "报文流水号")
    private String msgId;

    @ApiModelProperty(value = "资方id")
    private Integer companyId;

    @ApiModelProperty(value = "订单状态(0--启用,1--停用)")
    private String isEnable;

    @ApiModelProperty(value = "银行预留手机号")
    private String bankPhone;

    @ApiModelProperty(value = "贷款期限")
    private Integer term;

    @ApiModelProperty(value = "还款日")
    private String repayDay;

    @ApiModelProperty(value = "还款方式")
    private String repayType;

    @ApiModelProperty(value = "还款频率(0--天,1--月)")
    private String repayFrequency;

    @ApiModelProperty(value = "年化率%")
    private BigDecimal rate;

    @ApiModelProperty(value = "借款用途")
    private String used;

    @ApiModelProperty(value = "仲裁城市坐标")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String citySqes;

    @ApiModelProperty(value = "争议方式(1--公证,2--仲裁,3--诉讼)")
    private String controversy;

    @ApiModelProperty(value = "仲裁所在城市")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String cityRemark;

    @ApiModelProperty(value = "付款通道（1-通道一，2-通道二）")
    private String payPass;



}
